1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to image encoding and decoding, and more particularly, to image encoding and decoding, in which one of a plurality of color component images of an input image is predicted from a different color component image using a correlation between the color component images and the encoding order of the plurality of color component images is adaptively determined according to the characteristics of the input image.
2. Description of the Related Art
In general, when an image is captured, the captured original image is in a red, green, and blue (RGB) color format. To encode the RGB color format image, the RGB color format image is transformed into a YUV (or YCbCr) color format. Y is a black-white image and has a luminance component and U (or Cb) and V (or Cr) have color, components. Information is uniformly distributed over R, G, and B in an RGB image, but information is concentrated in Y and the amount of information in U (or Cb) and V (or Cr) is small in a YUV (or YCbCr) image. Thus, the YUV (or YCbCr) image can be compressed with high compression efficiency. To further improve compression efficiency, an YUV (or YCbCr) 4:2:0 image obtained by sampling color components U (or Cb) and V (or Cr) of an YUV (or YCbCr) image at a ratio of 1:4 is generally used.
However, since ¼ sampling of U (or Cb) and V (or Cr) in the YUV (or YCbCr) 4:2:0 image causes color distortion, it is not suitable for providing high display quality. Thus, a method for effectively encoding a YUV (or YCbCr) 4:4:4 image without sampling U (or Cb) and V (or Cr) is desired. Recently, residual color transform (RCT) which directly encodes an RGB 4:4:4 image to remove color distortion occurring in transformation of an RGB image to a YUV (or YCbCr) image has been suggested.
When an image like a YUV (or YCbCr) 4:4:4 image and an RGB 4:4:4 image in which color components have the same resolution is directly encoded using a related art encoding method, encoding efficiency is degraded. Thus, a method for improving encoding efficiency while maintaining high display quality by prediction based on the statistical characteristics of an image is desired for a case where a YUV (or YCbCr) 4:4:4 image is encoded or an RGB image is encoded in an RGB domain without being transformed to a YUV (or YCbCr) format.